#!/bin/sh
# set -x
cd ../IDSoftware
IDSOFTWAREDIR=`pwd`
PATH=$IDSOFTWAREDIR:$PATH
LD_LIBRARY_PATH=/usr/openwin/lib:/usr/lib:$LD_LIBRARY_PATH
DOOMWADDIR=$IDSOFTWAREDIR
export IDSOFTWAREDIR LD_LIBRARY_PATH DOOMWADDIR PATH

# Figure out if the user is running in 1280x1024
# if so, we can run doom -4, for full screen!!
#
/usr/openwin/bin/xdpyinfo | grep 1280 > /tmp/vidmode
if [ -s /tmp/vidmode ]; then
	$IDSOFTWAREDIR/sundgadoom -4;
else
	$IDSOFTWAREDIR/sundgadoom -3;
fi
rm -f /tmp/vidmode
